//index输入框校验
function checkForm() {
	var str = $('#wd').val().trim();
	if (str.length != 0) {
		var reg = /^(http(s)?:\/\/)?(download.csdn.net\/download\/)/;
		var r = str.match(reg);
		//console.table(r);
		if (r == null)
		//alert('您输入的CSDN下载地址不正确!'); 
		{
			//document.getElementById("warn").innerHTML="您输入的CSDN下载地址不正确!";
			$("#warn").html("您输入的CSDN下载地址不正确!");
			return false;
		}
		//return true;
		//if(!!$("#paycardNo").val())
		if(!showWindowHref()['paycardNo']&&!$("#paycardNo").val())
		{
				layer.open({
				type: 2,
				title: '填写淘宝卡密',
				maxmin: true,
				shadeClose: true, //点击遮罩关闭层
				area: ['320px', '150px'],
				content: 'iframe.html'
			    });
			return false;
		}//else if(!!showWindowHref()['paycardNo']){
			//$('#paycardNo').val(showWindowHref()['paycardNo']);
	} else {
		//$("#warn").text("");
		//getOrderInfo(str);
		$("#warn").html("CSDN下载地址不可为空！");
		return false;
	}
}


//对index输入框校验
$(function () {
	$('#wd').bind('input propertychange', function () {
		var str = $('#wd').val().trim();
		if (str.length != 0) {
			var reg = /^(http(s)?:\/\/)?(download.csdn.net\/download\/)/;
			var r = str.match(reg);
			if (r == "" || r != null) {
				$('#warn').html("");
			}
		} else
			$('#warn').html("");
	});
	fingerprintReport();
})


var fingerprintReport = function () {
	Fingerprint2.get(function (components) {
	  var murmur = Fingerprint2.x64hash128(components.map(function (pair) { return pair.value }).join(), 31)
	  $('#custId').val(murmur);
	})
  }